class_name GameplayEffectComponent
extends RefCounted

## 组件资源
var component_asset: GameplayEffectComponentAsset

## 效果
var parent: GameplayEffect


func _init(init_component_asset: GameplayEffectComponentAsset) -> void:
	component_asset = init_component_asset


func on_attach(source: Variant) -> void:
	_on_attach(source)


func on_update(delta: float) -> void:
	_on_update(delta)


func on_periodic_tick() -> void:
	_on_periodic_tick()


func on_duration_end() -> void:
	_on_duration_end()


func on_stack_update(variation: int) -> void:
	_on_stack_update(variation)


func on_detach(source: Variant) -> void:
	_on_detach(source)


#region Need to override
func _on_attach(_source: Variant) -> void:
	Logger.fatal("Need to override.")


func _on_update(_delta: float) -> void:
	Logger.fatal("Need to override.")


func _on_periodic_tick() -> void:
	Logger.fatal("Need to override.")


func _on_duration_end() -> void:
	Logger.fatal("Need to override.")


func _on_stack_update(_variation: int) -> void:
	Logger.fatal("Need to override.")


func _on_detach(_source: Variant) -> void:
	Logger.fatal("Need to override.")
#endregion
